#ifndef __studies_architecture_displaying_text__access_controller_h__
#define __studies_architecture_displaying_text__access_controller_h__



/** @file */


/** @todo */

// ==> C++ Headers
#include <iostream>
#include <string>
#include <functional>

// ==> 3rds Headers

// ==> Our Headers
#include <studies.architecture.returns/codes.h>

// ==> Namespaces
using namespace std;

// ==> Macro Constants

// ==> Macro Commands


/** ==> namespace of the organization */
namespace studies {
    /** ==> namespace for the project */
    namespace architecture {
        /** ==> displaying, interacting, translation, message, processor, object,
            storer */ 
        namespace displaying_text {

            // ==> Typedefs 

            // ==> Pre-Declarations

            // ==> Attributes 

            // ==> Functions

            // ==> Classes

            /** 
                @nosubgrouping 
            */
            class access_controller {

                // ==> access_controller - Friends

                /** Class allowed to access private members of @p
                    access_controller, in order to perform tests */
                friend class access_controller_tester;

            public:

                // ==> access_controller - Public Internal Types

                // ==> access_controller - Public Constructors

                /** */
                access_controller( ){}

                /** Destructor */
                ~access_controller( ){}

                // ==> access_controller - Public Accessors

                // ==> access_controller - Public Helpers

                // ==> access_controller - Public Processors

                /** */

                template <typename t_interactive>
                void show(t_interactive & p_interactive) {

                    std::cout << "\n\n\n\n\n\n\n\n\n\n===============\n\n";

                    std::cout << "Escolha uma opcao: \n";
                    int16_t l_option = 0;

                    std::cout << "0 - Sair\n"
                              << "1 - Acessar o sistema\n"
                              << "2 - Recuperar senha\n";
                    std::cin >> l_option;

                    std::string l_login;
                    std::string l_pwd;

                    switch (l_option) {
                    case 0:
                        break;
                    case 1:

                        std::cout << "\nLogin: " ;
                        std::cin >> l_login;
                        
                        std::cout << "\nPwd: " ;
                        std::cin >> l_pwd;

                        p_interactive.on_login_pwd_set(l_login, l_pwd);

                        break;
                    case 2:
                        p_interactive.recover_pwd();

                        break;
                    default:
                        std::cout << "Opcao invalida";
                    }
                }

                /** */
                void show_error(returns::codes p_error) {
                    // in a thread
                    std::cerr << "erro: " << p_error << std::endl;
                }

                // ==> access_controller - Public Operators

                // ==> access_controller - Public Attributes

            private:

                // ==> access_controller - Private Internal Types

                // ==> access_controller - Private Constructors

                // ==> access_controller - Private Accessors

                // ==> access_controller - Private Helpers

                // ==> access_controller - Private Processors

                // ==> access_controller - Private Operators

                // ==> access_controller - Private Attributes

            };
        }
    }
}
// =============================================================================
// I M P L E M E N T A T I O N
// =============================================================================

using namespace studies::architecture::displaying_text;

#endif
